package com.wk.springboot.service;

import com.wk.springboot.entity.LocalMessage;
import com.wk.springboot.mapper.LocalMessageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(propagation = Propagation.REQUIRED)
public class MessageStoreService {
    @Autowired
    private LocalMessageMapper messageMapper;
    
    public void saveMessageWithTransaction(LocalMessage message) {
        messageMapper.insert(message);
    }
}